import java.util.Scanner;

public class Homework_6 {
	public static void main(String[] args) {
		/*
		 * 6：双十二 家乐福购物打折， 所有购物打8折，购物满100打六折；会员一律打5折；会员购物超过1000，打4折。
		 * 输入购物金额，是不是会员，算出实际支付的金额
		 */
		Scanner in = new Scanner(System.in);
		System.out.println("请问您是否是会员？(y/n)");
		String custNo = in.next();
		double price;
		double total;
		if (custNo.equals("y") || custNo.equals("Y")) {
			System.out.println("请输入您的购物金额：");
			price = in.nextDouble();
			if (price > 0 && price <= 1000) {
				total = price * 0.5;
				System.out.println("您的实付金额为：" + total);
			} else {
				total = price * 0.4;
				System.out.println("您的实付金额为：" + total);
			}
		} else if (custNo.equals("n") || custNo.equals("N")) {
			System.out.println("请输入您的购物金额：");
			price = in.nextDouble();
			if (price > 0 && price < 100) {
				total = price * 0.8;
				System.out.println("您的实付金额为：" + total);
			} else {
				total = price * 0.6;
				System.out.println("您的实付金额为：" + total);
			}
		} else {
			System.out.println("对不起，您的输入有误。");
		}
	}
}
